#include <iostream>
using namespace std;
#include "tcpclient.hpp"
#include <memory>

void usage(const char *proname)
{
    cerr << "Usage:\n\t";
    cerr << proname << " serverip serverport" << endl;
}

// ./tcpclient sevrerip serverport
int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        usage(argv[0]);
        exit(1);
    }

    unique_ptr<tcpclient> clientptr(new tcpclient(argv[1], stoi(argv[2])));
    clientptr->start();

    return 0;
}